<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="static/js/jquery.min.js" type="text/javascript" ></script>
    <script src="static/js/bootstrap.min.js" type="text/javascript" ></script>
    <script src="static/js/jquery.blockUI.js" type="text/javascript" ></script>
    <script src="static/layer/layer.min.js" type="text/javascript" ></script>
    <script src="static/js/open.js" type="text/javascript" ></script>
    <link href="static/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
    <link href="static/css/style.css" rel="stylesheet"/>
    <style type="text/css">

    </style>
</head>
<body class="white-bg" style="width: 100%;background: none">
<div class="container wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <form class="form-horizontal m-t" id="commentForm">
            <div class="form-group">
                <label class="col-sm-2 control-label">节点名：</label>
                <div class="col-sm-4">
                    <input type="hidden" name="id" value="${node_id}"/>
                    <input name="name" class="form-control" value="${node.name}" readonly>
                </div>
                <label class="col-sm-2 control-label">类型：</label>
                <div class="col-sm-4">
                    <input name="shape" class="form-control" value="${node.shape}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" >处理发回：</label>
                <div class="col-sm-4">
                    <select name="deal_back" class="form-control">
                        <option value="0">不允许发回</option>
                        <option value="1">发回开始</option>
                        <option value="2">发回上一步</option>
                        <option value="3">发回任意</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label" title="当前节点未审批时，是否允许上一审批人撤回">是否允许撤回：</label>
                <div class="col-sm-4">
                    <select name="deal_type" class="form-control">
                        <option value="0">否</option>
                        <option value="1">是</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理类型：</label>
                <div class="col-sm-4">
                    <select name="deal_type" id="deal_type" class="form-control"
                            onchange="dealTypeSelect(this.options[this.options.selectedIndex].value)">
                        <option value="0">单人审批</option>
                        <option value="1">会签审批</option>
                        <option value="2">审批占比</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label" title="比例取整数，四舍五入">处理比例(%)：</label>
                <div class="col-sm-4">
                    <input type="number" class="form-control" name="deal_type_rate" id="deal_type_rate" value="50" disabled/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">节点属性：</label>
                <div class="col-sm-4">
                    <select name="deal_attr" class="form-control">
                        <option value="0">自动节点</option>
                        <option value="1">人工节点</option>
                    </select>
                </div>
                <label class="col-sm-2 control-label">节点参与组：</label>
                <div class="col-sm-4">
                    <select name="by_group" class="form-control">
                        <option value="">无【自批】</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理页面：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="detail_url" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">APP端页面：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="app_url" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">处理类：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="deal_action" maxlength="40" placeholder="可空"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" title="过滤下一节点范围的人员">节点人员过滤：</label>
                <div class="col-sm-4">
                    <select name="by_group" class="form-control">
                        <option value="0">全部人员</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    var wf_id='${wf_id}';
    var node_id='${node_id}';
    var prefix ="/design";
    function dealTypeSelect(deal_type)
    {
        if(deal_type=="2")
        {
            $("#deal_type_rate").removeAttr('disabled');
        }
        else
        {
            $("#deal_type_rate").attr('disabled',true);
        }
    }

    function submitHandler()
    {
        var url=prefix+"/savePorp";
        var data=$('#commentForm').serializeArray();
        $.operate.post(url,data);
    }
</script>
</body>
</html>